# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=u-boot-s5p6818
pkgver=1.2
pkgrel=0
pkgdesc="u-boot bootloader for Samsung Nexell S5P6818"
url="https://github.com/rafaello7/u-boot-nanopi-m3"
arch="aarch64"
license="BSD-2-Clause"
options="!check" # No test suite from upstream
makedepends="bsd-compat-headers dtc"
source="u-boot-s5p6818-$pkgver.tar.gz::https://github.com/rafaello7/u-boot-nanopi-m3/archive/v$pkgver.tar.gz
	makefile.patch
	kbuild.patch"
builddir="$srcdir/u-boot-nanopi-m3-$pkgver"

build() {
	make nanopim3_defconfig
	make
}

package() {
	install -Dm755 -t "$pkgdir"/usr/share/u-boot/nanopi-m3/ u-boot.bin
}

sha512sums="96fb3ea3ec345c2e91095d43b788bac1cacc36cff26b702ceaf1284ce83769957e3e0edb685d2db40d70dfe29e16a4196c0b574fc19fc9b736f683e5881c0337  u-boot-s5p6818-1.2.tar.gz
08de0f3d88f623f4ecb5d0b21bf16c232149de930744f9a541951e728b7e499144a37e44dcf6fa0827f72071a29c26187bfc9234399bf02c39e13fac9abd22a2  makefile.patch
43ccd3d3fc737da39b01095f4501b02897499ae14b15d59f1bfef82c8fc18139cb3dea31620c37932d04ed22bbf2d83235680e0ff5d5fb0cd2e3824b71831678  kbuild.patch"
